package com.example.webfluxtest.filter;

import org.springframework.stereotype.Component;
import org.springframework.web.server.ServerWebExchange;
import org.springframework.web.server.WebFilter;
import org.springframework.web.server.WebFilterChain;
import reactor.core.publisher.Mono;

/**
 * @description: MyFilter
 * @author: Zhengwen li
 * @date: 2022-12-08
 * @version:1.0
 **/
@Component
public class MyFilter implements WebFilter {

    @Override
    public Mono<Void> filter(ServerWebExchange exchange, WebFilterChain chain) {
        exchange.getRequest();
        return chain.filter(exchange);
    }
}
